package com.zuoye.text8;


import java.sql.SQLException;

public class Fun1 {
    public static void main(String[] args) throws SQLException {
        NewsDaoImpl4 newsDao=new NewsDaoImpl4();



        //查
        /*List<News> newsList=newsDao.getNewsList();
        for(News news:newsList){
            System.out.println(news.getId()+"\t"+news.getUserName()+"\t"+news.getPassword()+"\t"+news.getEmail()+"\t"+news.getUserType()+"\t");
        }
*/


        //增
       /* News news = new News();
        news.setUserName("root");
        news.setPassword("123456");
        news.setEmail("admin@kgc.cn");
        news.setUserType(1);

        newsDao.add(news);*/




        //删
       /* newsDao.delete(9);
*/

        //改
        News4 news1 = new News4();
        news1.setPassword("6543211");
        news1.setId(3);

        newsDao.update(news1);
    }


}
